<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="STYLESHEET" type="text/css" href="./styles.css" /></head>
<body>
<!-- ===================================================================== -->
<!-- = XML information goes here                                         = -->
<!-- ===================================================================== -->
<lzelement title="LzURL">
	<lztier>LFC</lztier>
	<lzcategory>Data</lzcategory> 
	<lzshortdesc>A utility class for manipulating URLs</lzshortdesc>
	<lzapi>api-lzurl.xml</lzapi> 
</lzelement>

<p>LzURL is used to break URLs into component parts: protocol, host, port, path, 
  file and query. Each part can be changed independently, and a new URL created. 
  For example:</p>

<example>
    &lt;canvas height="220" debug=&quot;true&quot;&gt;
        &lt;debug height="200" width="450"/&gt;
        &lt;script&gt;
            var urlstring = 'http://localhost:8080/lps/lzurl_example.lzx?lzt=swf';
            var url = new LzURL(urlstring);

            // list each part of this url
            Debug.write(&quot;protocol: &quot; + url.protocol);
            Debug.write(&quot;host: &quot; + url.host);
            Debug.write(&quot;port: &quot; + url.port);
            Debug.write(&quot;path: &quot; + url.path);
            Debug.write(&quot;file: &quot; + url.file);
            Debug.write(&quot;query: &quot; + url.query);
            
            // list the url
            Debug.write(&quot;Complete URL: &quot; + url);
           
            // Make it secure
            url.protocol = 'https';
            url.port = 8443;
            Debug.write(&quot;Secure URL: &quot; + url);
            
            // Change the query string
            url.query = 'lzt=source';
            Debug.write(&quot;New path: &quot; + url);
        &lt;/script&gt;
    &lt;/canvas&gt;
</example>

</body>
</html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
